package com.zjw.zy.utils;

import android.widget.Toast;

import androidx.annotation.NonNull;

import com.zjw.zy.utils.taskpool.TaskPool;

/**
 * @author ：zhong.jw
 * @date ：Created in 2022/9/26 17:09
 */
public final class ToastUtils {

    public static void showLong(@NonNull String msg) {
        try {
            TaskPool.main().post(() -> {
                Toast.makeText(AppUtils.getCurrentActivity(), msg, Toast.LENGTH_LONG).show();
            });
        } catch (Exception ignore) {

        }
    }


    public static void showShort(@NonNull String msg) {
        try {
            TaskPool.main().post(() -> {
                Toast.makeText(AppUtils.getCurrentActivity(), msg, Toast.LENGTH_SHORT).show();
            });
        } catch (Exception ignore) {

        }
    }
}
